Run <strike>SUN</strike>ORACLE VirtualBox with KVM modules on
KVM and VirtualBox are two virtualization solutions for Linux. KVM requires the module kvm_intel to be loaded, while VirtualBox can't run with the module running. So if you can't makeup your mind what to use, you need a little script magic to get this working. Here are the steps:
- Download libnotify for nice bubble notifications (just eye candy):
sudo apt-get install libnotify
(Of course you can use the Synaptics package manager in System-Administration and simply search for the library, but that's not sporty) - Create a script (see below) in
~/bin/vboxkvm
- Make it executable with
chmod +x ~/bin/vboxkvm
- Change the command in the VirtualBox menu entry from
VirtualBox
tovboxkvm
#!/bin/sh
SERVICE= 'kvm'
if ps ax | grep -v grep | grep $SERVICE > /dev /null
then
notify-send -t 10000 -u low -i gtk-dialog-info "Removing kvm and starting Virtualbox"
gksu "modprobe -r kvm_intel"
else
notify-send -t 10000 -u low -i gtk-dialog-info "OK kvm not loaded, Virtualbox starting"
fi
VirtualBox $
As usual: YMMVSERVICE= 'kvm'
if ps ax | grep -v grep | grep $SERVICE > /dev /null
then
notify-send -t 10000 -u low -i gtk-dialog-info "Removing kvm and starting Virtualbox"
gksu "modprobe -r kvm_intel"
else
notify-send -t 10000 -u low -i gtk-dialog-info "OK kvm not loaded, Virtualbox starting"
fi
VirtualBox $
Posted by Stephan H Wissel on 19 July 2010 | Comments (0) | categories: Linux